<?
	$pageSize = 15;
	$pageNum = 1;
    if (isset($_GET['pageNum'])==true) $pageNum = $_GET['pageNum'];
	$totalRows = 0;
	$id=-1; 
	if(isset($_GET['id'])) $id=$_GET['id'];
	$sanpham_noibat=$t->laysanphamphantrang($pageNum,$pageSize,$totalRows,'',-1,$id);
	$ten=$t->layloaisanpham($id);
	$row_ten=mysql_fetch_assoc($ten);
	$ten=$t->changeTitle($row_ten['ten_'.$lang]);
?>
<div class="center">
<div class="title_center">
	<span style="float:left;margin-left:55px;"><?=$row_ten['ten_'.$lang]?> </span>
</div>
<div class="content_center">
	<? 	$dem=0;
		while($row_sanpham=mysql_fetch_assoc($sanpham_noibat)){ $dem++;?>
    	<div style="width:162px;float:left;text-align:center;margin:10px;">
        	<div style="background:url(images/bo/khunghinhbong_center.png);width:145px;height:113px;margin-left:8px;">
            	<img src="<? if($row_sanpham['url_img']=='') echo "images/noimage.png"; else echo $row_sanpham['url_img']?>" style="float:left;width:132px;height:101px;margin:6px;" />	
            </div>
            <div style="width:162px;float:left;font-weight:bold;margin:3px 0px;">
            	<a href="<?=$rooturl?>san-pham-chi-tiet/<?=$row_sanpham['id']?>/<?=$t->changeTitle($row_sanpham['ten_'.$lang])?>.html" style="text-decoration:none;color:#01637f;" >
                	<?=$row_sanpham['ten_'.$lang];?><br />
					<?=strip_tags($row_sanpham['tomtat_'.$lang]);?><br />
                    Giá <span style="color:#FF0000;font-weight:bold;"><?=number_format($row_sanpham['gia'],0,",",".")?> VND</span>
                </a>
            </div>
        </div>
		<? if($dem%3==0){?>
        	<div class="c"></div>
		<? }?> 
	<? }?>
</div>
<div class="bo_center">
</div>
</div>
<div class="showpageArea">
        <?php echo $t->pagesList1($rootURL.'san-pham-danh-muc/'.$id.'/'.$ten.'.html',$totalRows,$pageNum,$pageSize,5); ?>
</div>